package com.sun.hunk.hibernate.dao;

import com.sun.hunk.hibernate.BaseHibernateDAO;
import com.sun.hunk.hibernate.domain.Role;
import com.sun.hunk.hibernate.domain.impl.RoleImpl;
import java.util.List;

/**
 *
 * @author sunil
 */
public class RoleDAO extends BaseHibernateDAO<RoleImpl> {

    public RoleDAO() {
        super(RoleImpl.class);
    }

    public List<RoleImpl> getAllRoles() {
        return super.findAll();
    }

    public Role getDefaultRole() {
        return super.getByProperty("description", "user");
    }
}
